<template>
    <div>
        <van-nav-bar title="我的晒图" left-arrow fixed @click-left="onClickLeft">
        </van-nav-bar>
        <div class="content">
            <div v-for="item in shareData.shaitu" :key="item.id">
                <MyShareListCard :data="shareData" :shaitu="item"></MyShareListCard>
            </div>
        </div>
    </div>
</template>
<script>
import MyShareListCard from '@/components/MyShareListCard.vue'
export default {
  name: 'myshare',
  data () {
    return {
      shareData: {}
    }
  },
  components: {
    MyShareListCard
  },
  methods: {
    onClickLeft () {
      this.$root.$router.go(-1)
    }
  },
  mounted () {
    this.$axios.get('/api/get', {
      params: {
        map: 'shaitu',
        id: sessionStorage.userid,
        mod: 'user',
        related: 1
      }
    }).then((result) => {
      // console.log('result :', result.data.shaitu)
      this.shareData = result.data
    //   console.log('object :', this.shareData)
    }).catch((err) => {
      console.log('err :', err)
    })
  }
}
</script>
<style scoped>
.van-nav-bar{
    border-bottom: 1px solid #ddd;
}
.content{
    margin-top: 60px;
}
</style>
